home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Commun⁄Network / RevRdist Folder / RevRdist / headers / rsrc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-31  |  8.1 KB  |  244 lines  |  [TEXT/KAHL]

  1. /*
  2.  * rsrc.h - #defines, etc, which need to stay synched with the resource
  3.  * source file (RevRdist.r)
  4.  */
  5.  
  6. #define    RSRC_BASE    12100        /* base for resource numbering */
  7.  
  8. #define CREATOR        'Dist'        /* our creator id */
  9. #define    TYPE_CONT    'TEXT'        /* file type of control file */
  10. #define TYPE_PREF    'RDsp'        /* file type of prefs file */
  11. #define    TYPE_TEMP    'Junk'        /* file type of temp files */
  12. #define    TYPE_LONG    'Long'        /* rsrc type of misc params */
  13. #define    TYPE_TEXT    'TEXT'        /* rsrc type of extended text */
  14.  
  15. #define    RSRC_MOUNT    2000        /* resid for mount XCMD */
  16. #define    RSRC_UNMOUNT (RSRC_MOUNT+1)    /* and for unmount XCMD */
  17. #define    RSRC_INITICON    131        /* resid of INIT's ICN# */
  18. #define    RSRC_ABOUT    (RSRC_BASE)    /* resid of About text */
  19.  
  20. /*
  21.  * Misc parameter resource ids
  22.  */
  23.  
  24. enum
  25. {
  26.      TIME_INTERVAL = RSRC_BASE    /* seconds between runs */
  27.     ,JUNK_PARM                    /* min/max junk residence times & space */
  28.     ,FLAG_PARM                    /* initial value for Flags */
  29. };
  30.  
  31. /*
  32.  * Window refCons, add RSRC_BASE to get WIND resource id
  33.  */
  34.  
  35. enum
  36. {
  37.      WIND_STATUS = 1            /* pause/continue/cancel dialog */
  38.     ,WIND_ACTIVITY                /* window for listing of actions as they
  39.                                  * occur */
  40.     ,WIND_ERRORS                /* error message window */
  41.     ,WIND_PREF                    /* preferences dialog */
  42.     ,ALERT_WARN                    /* warning which can be ignored */
  43.     ,ALERT_PANIC                /* warning which cannot be ignored */
  44.     ,WIND_FLAGS                    /* dialog for setting flags */
  45.     ,WIND_ABOUT                    /* about dialog */
  46.     ,ALERT_SAVE                    /* save file before closing */
  47. };
  48.  
  49. /*
  50.  * Item numbers
  51.  */
  52.  
  53. enum
  54. {                                /* in File menu */
  55.      FILE_OPEN = 1                /* Open ... */
  56.     ,FILE_SAVE                    /* Save preferences */
  57.     ,FILE_SAVEAS                /* Save preferences as ... */
  58.     ,FILE_QUIT                    /* Quit */
  59.     ,FILE_CLOSE                    /* dummy */
  60. };
  61.  
  62. enum
  63. {                                /* in Edit menu */
  64.      EDT_UNDO = 1
  65.     ,EDT_CUT = 3
  66.     ,EDT_COPY
  67.     ,EDT_PASTE
  68.     ,EDT_CLEAR
  69. };
  70.  
  71. enum                            /* in status dialog */
  72. {
  73.      STS_PAUSE = 1                /* pause button */
  74.     ,STS_CANCEL                    /* cancel button */
  75.     ,STS_CONT                    /* continue button */
  76.     ,STS_STATUS                    /* current status text */
  77.     ,STS_WAIT                    /* please wait text */
  78.     ,STS_REBOOT                    /* reboot text */
  79.     ,STS_PICT                    /* our picture */
  80. };
  81.  
  82. enum                            /* in preferences dialog */
  83. {
  84.      PRF_GO = 1                    /* go to it button */
  85.     ,PRF_CANCEL                    /* cancel button */
  86.     ,PRF_ZONE = 4                /* AppleShare zone name */
  87.     ,PRF_SRVR = 6                /* AppleShare server name */
  88.     ,PRF_USER = 8                /* AppleShare user login name */
  89.     ,PRF_PASS = 10                /* User's password */
  90.     ,PRF_DISTF = 12                /* distribution control file editText */
  91.     ,PRF_MASTF = 14                /* master folder on server editText */
  92.     ,PRF_JUNKF = 16                /* junk folder name editText */
  93.     ,PRF_INTERVAL = 18            /* update interval editText */
  94.     ,PRF_JMIN = 20                /* minimum junk lifetime editText */
  95.     ,PRF_JMAX = 22                /* maximum junk lifetime editText */
  96.     ,PRF_DMIN = 24                /* free space threshold editText */
  97.     ,PRF_LAST = 24                /* highest editText item */
  98. };
  99.  
  100. /*
  101.  * alert items
  102.  */
  103. enum
  104. {
  105.      ALRT_OKAY = 1                /* okay button */
  106.     ,ALRT_CANCEL                /* cancel button */
  107.     ,ALRT_TEXT                    /* alert text */
  108. };
  109.  
  110. enum
  111. {
  112.      SAVE_YES = 1                /* yes (save) button */
  113.     ,SAVE_NO                    /* no (don't save) button */
  114.     ,SAVE_CANCEL                /* cancel close or quit */
  115.     ,SAVE_TEXT                    /* alert text */
  116. };
  117.  
  118.  
  119. /*
  120.  * Messages in STR# RSRC_BASE+0 - most error messages
  121.  */
  122. #define    ERR_STR        (RSRC_BASE)
  123. enum error_e
  124. {
  125.      E_SYS = 1    /* When ^0 called ^1, the system returned error ^2 */
  126.     ,E_FILE        /* ^0 had problems with ^1.  Error ^2 */
  127.     ,E_QUIT        /* Quitting per user request */
  128.     ,E_NOMEM    /* Out of memory in ^0 (hint: ^1) */
  129.     ,E_REQUEST    /* Internal error: bad dispatcher request/result ^1 in ^0 */
  130.     ,E_STATE    /* Internal error: bad dispatcher state in ^0: ^1 */
  131.     ,E_DISTF    /* Cannot locate distribution control file: ^0 */
  132.     ,E_DISTL    /* Syntax error(s) in directives file */
  133.     ,E_PREFIX    /* Bad prefix character in line  */
  134.     ,E_NOFNAME    /* Missing file/folder name in line  */
  135.     ,E_BADNAME    /* Illegal file/folder name in line  */
  136.     ,E_NOACTION    /* Missing action list in line  */
  137.     ,E_BADACTION/* Unrecognized action option in line  */
  138.     ,E_BADTYPE    /* Bad file TYPE(CREATOR) specification */
  139.     ,E_ALTNAME    /* Garbage at end of line  */
  140.     ,E_DUPENAME    /* File/folder specified more than once  */
  141.     ,E_ENDFERR    /* Internal error: corrupt dist_node at end of folder mark ^0: ^1 */
  142.     ,E_DISTBAD    /* Folder mismatch found by ^0 at\0D^1 */
  143.     ,E_FIRST    /* First entry in directives file must be root folder */
  144.     ,E_LAST        /* Directives file has unmatched folder entries */
  145.     ,E_PREFS    /* Preferences file (^0) missing or corrupt */
  146.     ,E_NOPREF    /* No preferences file found - should defaults be used? */
  147.     ,E_NOVOL    /* Cannot determine which volume to update */
  148.     ,E_NOPRINT    /* Printing of control files not supported - open instead? */
  149.     ,E_HFS        /* Sorry, ^0 requires the Hierarchical File System */
  150.     ,E_MFS        /* Sorry, ^0 requires HFS volumes.  ^1 is MFS. */
  151.     ,E_LISTONLY    /* Updates disabled.  Continue, but only list actions? */
  152.     ,E_NOSERVER    /* Cannot find master folder (^0) */
  153.     ,E_NOACCESS    /* Must have "See files" and "See folders" access to master folder (^0) */
  154.     ,E_NOJUNK    /* Cannot open "junk" folder (^0) */
  155.     ,E_ACCESS    /* No access to folder (^0) */
  156.     ,E_NAMELEN    /* Internal error: name too long in ^0 (^1) */
  157.     ,E_BADJUNKF    /* Bad or missing "junk" folder STR resource */
  158.     ,E_BADTEMPF    /* Bad or missing temp file STR resource */
  159.     ,E_TYPE        /* Cannot save preferences to ^0: wrong file type */
  160.     ,E_DOQUIT    /* Quitting now may damage files.  Okay to ignore quit and continue? */
  161.     ,E_REMOUNT    /* Could not remount volumes due to system error ^0 */
  162.     ,E_MISSING    /* Missing from master: ^0 */
  163.     ,E_MISTYPE    /* Control file does not match master for ^0 */
  164.  
  165. };
  166.  
  167. /*
  168.  * Messages for the activity listing window
  169.  */
  170. #define    LST_STR        (RSRC_BASE+1)
  171. enum activity_e
  172. {
  173.      L_SYS = 1    /* When ^0 called ^1, the system returned error ^2 */
  174.     ,L_FILE        /* ^0 had problems with ^1.  Error ^2 */
  175.     ,L_SKIP        /* Skipping emptying of junk folder (^0) */
  176.     ,L_DOJUNK    /* Emptying junk folder (^0) */
  177.     ,L_STARTF    /* Working on ^0 */
  178.     ,L_ENDF        /* Done with ^0 */
  179.     ,L_WCREATE    /* Would create folder ^0 */
  180.     ,L_IGNORE    /* Ignoring ^0 */
  181.     ,L_CRITERION/* Used ^0^1 for ^2 */
  182.     ,L_MISSING    /* Missing from master: ^0 */
  183.     ,L_SKPJUNK    /* Skipping junking of ^0 */
  184.     ,L_JUNKING    /* Moving ^0 to junk folder */
  185.     ,L_COPYING    /* Copying ^0 byte file ^1 to ^2 */
  186.     ,L_DOEMPTY    /* Discarding contents of folder ^0 */
  187.     ,L_DISCARD    /* Discarding ^0 */
  188.     ,L_NOWHAT    /* Don't know what to do with ^0 */
  189.     ,L_ACCESS    /* No access to folder (^0) */
  190.     ,L_FINFO    /* Updating Finder info for ^0 */
  191.     ,L_DTCOMM    /* Copying comment for ^0 */
  192.     ,L_DTICON    /* Copying icons for ^0 */
  193.     ,L_DTINFO    /* Updated Desktop info for ^0 */
  194.     ,L_DTDEL    /* Deleted Desktop info for ^0 */
  195.     ,L_TOOMANYJ    /* Too many copies of "^0" in junk folder */
  196.     ,L_MISTYPE    /* Control file does not match master for ^0 */
  197.     ,L_ALIAS    /* Updating alias to ^0 */
  198.     ,L_BLESSED    /* Setting Blessed folder */
  199.     ,L_BADBLESSED    /* Volume ^0 missing ^1.  It might not boot. */
  200.     ,L_PROTECT    /* Cannot preserve protection on ^0.  File hidden. */
  201.     ,L_DONE        /* RevRdist complete */
  202. };
  203.  
  204. /*
  205.  * STR  resource id's
  206.  */
  207. enum {
  208.      STR_PREFS = RSRC_BASE        /* name of preferences file */
  209.     ,STR_DISTF                    /* name of distribution control file */
  210.     ,STR_ZONE                    /* name of server zone */
  211.     ,STR_SRVR                    /* name of server node */
  212.     ,STR_USER                    /* user name on server */
  213.     ,STR_PASS                    /* password of user on server */
  214.     ,STR_MASTF                    /* name of server master folder */
  215.     ,STR_JUNKF                    /* name of junk folder */
  216.     ,STR_JUNKSUF                /* suffix to uniquify junk files */
  217.     ,STR_UNTITLED                /* name for document with no file */
  218.     ,STR_PSAVE                    /* text for prefs SFPutFile */
  219.     ,STR_START                    /* name of startup application */
  220.     ,STR_TEMP1                    /* first temp file name */
  221.     ,STR_TEMP2                    /* second temp file name */
  222. };
  223.  
  224. /*
  225.  * Numbers for NAME_STR strings
  226.  */
  227. #define    NAME_STR    (RSRC_BASE+2)
  228. enum {
  229.      NAME_FOLDER = 1            /* name of system folder */
  230.     ,NAME_SYSTEM                /* name of system file */
  231.     ,NAME_FINDER                /* name of shell file */
  232. };
  233.  
  234. /*
  235.  * Numbers for MISC_STR strings
  236.  */
  237. #define    MISC_STR    (RSRC_BASE+3)
  238. enum {
  239.      ALIAS_WORD = 1                /* distfile word for alias */
  240.     ,ALIAS_INFO                    /* pseudo-type/creator for Finder aliases */
  241.     ,ICON_WORD                    /* distfile word for icon files */
  242.     ,ICON_INFO                    /* pseudo-type/creator for Finder icon files */
  243.     ,ICON_FNAME                    /* name Finder uses for icon files */
  244. };